package com.ruoyi.web.controller.system;

import com.ruoyi.business.service.impl.WxSignService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class WeiXinApiController {

    @Autowired
    @Qualifier("WxSignService")
    private WxSignService wxSignService;

    @GetMapping("/weixin/access_token/sign")
    public AjaxResult signUrl(@RequestParam String url) {
        Map<String, String> sign = wxSignService.sign(url);
        return AjaxResult.success(sign);
    }
}
